<template>
  <div class="post-item">
    <author-item :badge_url="badge_url" :img_url="img_url" :name="name"></author-item>
    <!-- 视频 -->
    <post-video-img v-if="type == 5" :img_url="video_img_url" :title="title" :id="id"></post-video-img>
    <!-- 图片 -->
    <nine-pic v-else :imgs="pics"></nine-pic>
    <!-- 描述信息 -->
    <business-desc :content="content" :title="type == 0 ? title : ''"></business-desc>
    <appropriate-option :subjects="subjects"></appropriate-option>
    <!-- 地址信息 -->
    <address-box :address="address"></address-box>
    <!-- 收藏和浏览数量 -->
    <subject-box :like_count="like_count" :view_count="view_count"></subject-box>
  </div>
</template>

<script>
import AuthorItem from '../businesses/AuthorItem.vue'
import PostVideoImg from '@/components/posts/PostVideoImg'
import NinePic from '../businesses/NinePic.vue'
import BusinessDesc from '../businesses/BusinessDesc.vue'
import SubjectBox from '../businesses/SubjectBox.vue'
import AddressBox from './AddressBox.vue'
import AppropriateOption from '../businesses/AppropriateOption.vue'
export default {
  props: {
    id: Number,
    img_url: String,
    name: String,
    badge_url: String,
    video_img_url: String,
    title: String,
    type: Number,
    pics: Array,
    address: String,
    content: String,
    subjects: Array,
    view_count: [Number, String],
    like_count: [Number, String]
  },
  components: {
    AuthorItem,
    PostVideoImg,
    NinePic,
    SubjectBox,
    AddressBox,
    BusinessDesc,
    AppropriateOption
  }
}
</script>

<style></style>
